import http from "./http.js";
import config from "@/config/index.config.js";

// 用户登录
export const postLogin = (data) => http.POST(`${config.baseUrl}/api/user/login`, data);
// 获取短信验证码
export const getVCode = (data) => http.POST(`${config.baseUrl}/api/sms/send`, data);
//用户信息详情
export const getUserinfo = (data) => http.POST(`${config.baseUrl}/api/user/getUserinfo`, data);
//用户注册
export const registerUser = (data) => http.POST(`${config.baseUrl}/api/user/register`, data);
//视频课堂分类列表
export const listVideoCate = (data) => http.POST(`${config.baseUrl}/api/v1.video/getCate`, data);
//视频课堂视频分页列表
export const paginateVideo = (data) => http.POST(`${config.baseUrl}/api/v1.video/getList`, data);
//报道分类列表
export const listNewsCate = (data) => http.POST(`${config.baseUrl}/api/v1.activity/activityCategory`, data);
//报道分页列表
export const paginateNews = (data) => http.POST(`${config.baseUrl}/api/v1.activity/activityNews`, data);
//活动报道详情
export const getNewsInfo = (data) => http.POST(`${config.baseUrl}/api/v1.activity/detail`, data);
//报名项目分页列表
export const paginateNewsItem = (data) => http.POST(`${config.baseUrl}/api/v1.activity/activityIten`, data);
//报名项目详情
export const getNewsItemInfo = (data) => http.POST(`${config.baseUrl}/api/v1.activity/itemDetail`, data);
//报名申请
export const signup = (data) => http.POST(`${config.baseUrl}/api/v1.activity/apply`, data);
//考试列表
export const listExam = (data) => http.POST(`${config.baseUrl}/api/v1.exam/getPlanExam`, data);
//考试答卷答题列表
export const listExamQus = (data) => http.POST(`${config.baseUrl}/api/v1.exam/getQuestion`, data);
//提交答题
export const submitExamQn = (data) => http.POST(`${config.baseUrl}/api/v1.exam/answer`, data);
//考试成绩
export const scoreExam = (data) => http.POST(`${config.baseUrl}/api/v1.exam/score`, data);
//系统消息
export const listNotify = (data) => http.POST(`${config.baseUrl}/api/vi.system/infos`, data);
//收货地址列表
export const listAddress = (data) => http.POST(`${config.baseUrl}/api/v1.address/getList`, data);
//添加地址
export const addAddress = (data) => http.POST(`${config.baseUrl}/api/v1.address/add`, data);
//删除地址
export const delAddress = (data) => http.POST(`${config.baseUrl}/api/v1.address/delete`, data);
//--- 商城 start------
//加入购物车
export const addShoppingcard = (data) => http.POST(`${config.baseUrl}/api/v1.shop/toCart`, data);
//购物车
export const listShoppingcard = (data) => http.POST(`${config.baseUrl}/api/v1.shop/cart`, data);
//购买页面商品列表
export const listTobuy = (data) => http.POST(`${config.baseUrl}/api/v1.shop/toBuy`, data);
//商品分类
export const listProductCate = (data) => http.POST(`${config.baseUrl}/api/v1.shop/getCate`, data);
//商品列表
export const paginateProduct = (data) => http.POST(`${config.baseUrl}/api/v1.shop/getList`, data);
//商品详情
export const getProductDetail = (data) => http.POST(`${config.baseUrl}/api/v1.shop/detail`, data);
//点赞 取消为同一个接口 如果收藏了 再点击就是取消
export const doZhan = (data) => http.POST(`${config.baseUrl}/api/v1.shop/zan`, data);
//去付款
export const pay = (data) => http.POST(`${config.baseUrl}/api/v1.order/pay`, data);
//--- 商城 end------

